<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <meta http-equiv='X-UA-Compatible' content='ie=edge'>
  <title>Document</title>
</head>
<body>
  <div class='test_btn'>
    click
  </div>
  <style>
    .test_btn{
      width: 100px;
      height: 30px;
      line-height: 30px;
      border: 1px solid #747474;
      border-radius: 4px;
      text-align: center;
      cursor: pointer;
    }
  </style>

  <script>
    let dom_btn = document.getElementsByClassName('test_btn')
    document.addEventListener('click',function(event){
      console.log(this);
      return this.doSomething(event.type)
    })

    // document.addEventListener('click',event => {
    //   console.log(this);//window
    //   return this.doSomething(event.type)
    // })

    function doSomething (event) {
      console.log(event)
    }

  </script>
</body>
</html>